package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BasicMessageChannelMapper;
import com.ruoyi.system.domain.BasicMessageChannel;
import com.ruoyi.system.service.IBasicMessageChannelService;

/**
 * 消息通道Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class BasicMessageChannelServiceImpl implements IBasicMessageChannelService 
{
    @Autowired
    private BasicMessageChannelMapper basicMessageChannelMapper;

    /**
     * 查询消息通道
     * 
     * @param messageChannelId 消息通道主键
     * @return 消息通道
     */
    @Override
    public BasicMessageChannel selectBasicMessageChannelByMessageChannelId(Long messageChannelId)
    {
        return basicMessageChannelMapper.selectBasicMessageChannelByMessageChannelId(messageChannelId);
    }

    /**
     * 查询消息通道列表
     * 
     * @param basicMessageChannel 消息通道
     * @return 消息通道
     */
    @Override
    public List<BasicMessageChannel> selectBasicMessageChannelList(BasicMessageChannel basicMessageChannel)
    {
        return basicMessageChannelMapper.selectBasicMessageChannelList(basicMessageChannel);
    }

    /**
     * 新增消息通道
     * 
     * @param basicMessageChannel 消息通道
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertBasicMessageChannel(BasicMessageChannel basicMessageChannel)
    {
        return basicMessageChannelMapper.insertBasicMessageChannel(basicMessageChannel);
    }

    /**
     * 修改消息通道
     * 
     * @param basicMessageChannel 消息通道
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateBasicMessageChannel(BasicMessageChannel basicMessageChannel)
    {
        return basicMessageChannelMapper.updateBasicMessageChannel(basicMessageChannel);
    }

    /**
     * 批量删除消息通道
     * 
     * @param messageChannelIds 需要删除的消息通道主键
     * @return 结果
     */
    @Override
    public int deleteBasicMessageChannelByMessageChannelIds(Long[] messageChannelIds)
    {
        return basicMessageChannelMapper.deleteBasicMessageChannelByMessageChannelIds(messageChannelIds);
    }

    /**
     * 删除消息通道信息
     * 
     * @param messageChannelId 消息通道主键
     * @return 结果
     */
    @Override
    public int deleteBasicMessageChannelByMessageChannelId(Long messageChannelId)
    {
        return basicMessageChannelMapper.deleteBasicMessageChannelByMessageChannelId(messageChannelId);
    }
}
